package com.qqtech.qquan.push.model;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.frame.model.BaseDomain;
import com.qqtech.qquan.push.enums.PushBizzEnum;

@SuppressWarnings("serial")
public class PushLog extends BaseDomain {

	// columns START
	/** 用户id,多个以英文分号";"隔开 */
	private java.lang.String userIds;
	/** 用户(设备)别名，多个别名用";"隔开.一次推送最多 1000 个 */
	private java.lang.String aliases;
	/** 用户(设备)标签，多个标签用英文分号";"隔开,且是"or"的意思.一次推送最多 20 个 */
	private java.lang.String tags;
	/** 标签,多个标签以";"隔开,且是"and"的意思.一次推送最多 20 个 */
	private java.lang.String tagAnds;
	/** 推送标题 */
	private java.lang.String title;
	/** 通知通知 */
	private java.lang.String alert;
	/** 推送自定义消息 */
	private java.lang.String message;
	/** 推送附加信息(json) */
	private java.lang.String extras;
	/** 离线消息保留时长(秒).最长 10 天,设置为 0 表示不保留离线消息，只有推送当前在线的用户可以收到 **/
	private Integer timeToLive;
	/** 本推送的msg_id **/
	private String msgId;
	/** 要覆盖的消息ID **/
	private String overrideMsgId;
	/** 推送的业务类型:102-APP全部更新;103-针对特定设备更新;401-被点赞;301-评论;201-友事;9999-其它 */
	private java.lang.Integer pushBizz;
	/**社区id**/
	private java.lang.Integer communityId;
	// columns END
	public PushLog() {
	}

	public PushLog(java.lang.Integer id) {
		this.id = id;
	}

	public void setUserIds(java.lang.String userIds) {
		this.userIds = userIds;
	}

	public java.lang.String getUserIds() {
		return this.userIds;
	}

	public void setAliases(java.lang.String aliases) {
		this.aliases = aliases;
	}

	public java.lang.String getAliases() {
		return this.aliases;
	}

	public void setTags(java.lang.String tags) {
		this.tags = tags;
	}

	public java.lang.String getTags() {
		return this.tags;
	}

	public void setTagAnds(java.lang.String tagAnds) {
		this.tagAnds = tagAnds;
	}

	public java.lang.String getTagAnds() {
		return this.tagAnds;
	}

	public void setTitle(java.lang.String title) {
		this.title = title;
	}

	public java.lang.String getTitle() {
		return this.title;
	}

	public void setAlert(java.lang.String alert) {
		this.alert = alert;
	}

	public java.lang.String getAlert() {
		return this.alert;
	}

	public void setMessage(java.lang.String message) {
		this.message = message;
	}

	public java.lang.String getMessage() {
		return this.message;
	}

	public void setExtras(java.lang.String extras) {
		this.extras = extras;
	}

	public java.lang.String getExtras() {
		return this.extras;
	}

	public Integer getTimeToLive() {
		return timeToLive;
	}

	public void setTimeToLive(Integer timeToLive) {
		this.timeToLive = timeToLive;
	}

	public String getMsgId() {
		return msgId;
	}

	public void setMsgId(String msgId) {
		this.msgId = msgId;
	}

	public String getOverrideMsgId() {
		return overrideMsgId;
	}

	public void setOverrideMsgId(String overrideMsgId) {
		this.overrideMsgId = overrideMsgId;
	}

	public java.lang.Integer getPushBizz() {
		return pushBizz;
	}

	public void setPushBizz(java.lang.Integer pushBizz) {
		this.pushBizz = pushBizz;
	}

	public void setNotNull(PushLog pushLog) {
		if (pushLog.getAlert() == null) {
			pushLog.setAlert("");
		}
		if (pushLog.getAliases() == null) {
			pushLog.setAliases("");
		}
		if (pushLog.getExtras() == null) {
			pushLog.setExtras("");
		}
		if (pushLog.getMessage() == null) {
			pushLog.setMessage("");
		}
		if (pushLog.getTagAnds() == null) {
			pushLog.setTagAnds("");
		}
		if (pushLog.getTags() == null) {
			pushLog.setTags("");
		}
		if (pushLog.getTitle() == null) {
			pushLog.setTitle("");
		}
		if (pushLog.getUserIds() == null) {
			pushLog.setUserIds("");
		}
		if (pushLog.getMsgId() == null) {
			pushLog.setMsgId("");
		}
		if (pushLog.getOverrideMsgId() == null) {
			pushLog.setOverrideMsgId("");
		}
		if (pushLog.getTimeToLive() == null) {
			pushLog.setTimeToLive(0);
		}
		if (pushLog.getPushBizz() == null || pushLog.getPushBizz().intValue() == 0) {
			pushLog.setPushBizz(PushBizzEnum.OTHER.getCode());
		}
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}

	public java.lang.Integer getCommunityId() {
		return communityId;
	}

	public void setCommunityId(java.lang.Integer communityId) {
		this.communityId = communityId;
	}
}
